<!DOCTYPE HTML>
<html  lang="zh" xmlns:th="http://www.thymeleaf.org">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="white-bg">
    <div id="formBox" class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-loginAuth-edit" th:object="${payUserAll}">
            <input id="id" name="id" th:field="*{id}" class="form-control"  type="hidden">                                                                            <div class="form-group">
                <label class="col-sm-3 control-label">用户账号：</label>
                <div class="col-sm-8">
                    <input th:disabled="true" id="userLoginName" name="userLoginName" th:field="*{userLoginName}" class="form-control" type="text">
                </div>
            </div>
			<div class="form-group">
				<label class="col-sm-3 control-label">商户状态：</label>
				<div class="col-sm-8">
					<select name="accoutState" class="form-control m-b" th:with="type=${@dict.getType('pay_accout_state')}">
						<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{accoutState}"></option>
					</select>
				</div>
			</div>
            <div class="form-group">
                <label class="col-sm-3 control-label">姓名：</label>
                <div class="col-sm-8">
                    <input th:disabled="true" id="realname" name="realname" th:field="*{realname}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">手机号码：</label>
                <div class="col-sm-8">
                    <input th:disabled="true" id="phonenumber" name="phonenumber" th:field="*{phonenumber}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">行业：</label>
                <div class="col-sm-8">
                    <input th:disabled="true" id="industry" name="industry" th:field="*{industry}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">自我介绍：</label>
                <div class="col-sm-8">
                    <input th:disabled="true" id="profile" name="profile" th:field="*{profile}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">入金手续费率：</label>
                <div class="col-sm-8">
                    <input th:disabled="true" id="inRate" name="inRate" th:field="*{inRate}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">出金手续费率：</label>
                <div class="col-sm-8">
                    <input th:disabled="true" id="outRate" name="outRate" th:field="*{outRate}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">入金汇率：</label>
                <div class="col-sm-8">
                    <input th:disabled="true" id="tokinRate" name="tokinRate" th:field="*{tokinRate}" class="form-control" type="text">
                </div>
            </div>

            <div th:if="${authType == '1'}" class="form-group">
                <label class="col-sm-3 control-label">身份证正面：</label>
                <div class="col-sm-8">
                    <img alt="" class="m-t-xs img-responsive" th:src="(${payUserAll.certImgFont} == '') ? @{/img/no_img.png} : @{/} + ${payUserAll.certImgFont}">
                </div>
            </div>

            <div th:if="${authType == '1'}" class="form-group">
                <label class="col-sm-3 control-label">身份证背面：</label>
                <div class="col-sm-8">
                    <img alt="" class="m-t-xs img-responsive" th:src="(${payUserAll.certImgBack} == '') ? @{/img/no_img.png} : @{/} + ${payUserAll.certImgBack}">
                </div>
            </div>

            <div th:if="${authType == '2'}"  class="form-group">
                <label class="col-sm-3 control-label">护照照片：</label>
                <div class="col-sm-8">
                    <img alt="" class="m-t-xs img-responsive" th:src="(${payUserAll.certImgPass} == '') ? @{/img/no_img.png} : @{/} + ${payUserAll.certImgPass}">
                </div>
            </div>

            <div class="form-group">
                <label class="col-sm-3 control-label">实名认证状态：</label>
                <div class="col-sm-8">
                    <select name="certState" class="form-control m-b" th:with="type=${@dict.getType('pay_user_cert_state')}">
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{certState}"></option>
                    </select>
                </div>
            </div>


		</form>
    </div>
    <script th:src="@{/js/vue.min.js}"></script>
    <script th:src="@{/js/jquery.min.js}"></script>
    <script th:src="@{/js/ajaxupload.js}"></script>
    <div th:include="include::footer"></div>
    <script type="text/javascript">
        var prefix = ctx + "manager/user";
        var roleid = "user_login_auth";
		$("#form-loginAuth-edit").validate({
        rules:{
        },
        messages: {
            "userLoginName": {
                remote: "用户已经存在"
            }
        }
        });

		function submitHandler() {
	        if ($.validate.form()) {
                var id = $("input[name='id']").val();
                var accoutState = $("select[name='accoutState']").val();
                var certState = $("select[name='certState']").val();
                var params ='id='+id;
                params += '&accoutState=' + accoutState;
                params += '&certState=' + certState;
                $.operate.save(prefix + "/edit",params);
            }
        }
	</script>
</body>
</html>
